/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package com.googlecode.ivybeans.module.classpath;

import com.googlecode.ivybeans.facade.IvyLibrary;
import org.netbeans.api.java.classpath.ClassPath;

import org.netbeans.api.project.Project;
import org.netbeans.spi.java.classpath.ClassPathFactory;
import org.netbeans.spi.java.classpath.ClassPathProvider;
import org.openide.filesystems.FileObject;

/**
 * 
 * @author lforet
 */
public class ClassPathProviderImpl implements ClassPathProvider {

    private final IvyLibrary ivyLibrary;
    private final Project project;
    
    public ClassPathProviderImpl(Project project, IvyLibrary ivyLibrary) {
        this.project = project;
        this.ivyLibrary = ivyLibrary;
    }
    
    public ClassPath findClassPath(FileObject fileObject, String type) {
        if (ClassPath.COMPILE.equals(type)) {
            return ClassPathFactory.createClassPath(new CompileClassPathImpl(project, ivyLibrary));
        }
        // only interested by the compile class for instance
        return null;
    }

   
  
}
